package com.resourcestore.dao;

import java.util.List;

import com.resourcestore.dao.BaseDao;
import com.resourcestore.model.CourseCategory;
import com.resourcestore.model.MajorGroup;
import com.resourcestore.utils.tag.Pagination;


public class CourseCategoryDao extends BaseDao {

	public List<CourseCategory> selectCourseCategory(){
		List<CourseCategory> list=this.queryForList("selectCourseCategory");
		return list;
	}
	
	public List<CourseCategory> selectCourseCategoryByIsPublic(CourseCategory courseCategory){
		List<CourseCategory> list=this.queryForList("selectCourseCategoryByIsPublic",courseCategory);
		return list;
	}
	
	public List<CourseCategory> selectCourseCategoryPage(CourseCategory courseCategory,Pagination pagination){
		List<CourseCategory> list = this.queryForPage("selectCourseCategoryPage", courseCategory,pagination);
		return list;
	}
	
	public int queryCourseCategoryNum(CourseCategory courseCategory) {
		return this.queryNum("selectCourseCategoryCount", courseCategory);
	}
	
	public CourseCategory selectCourseCategoryById(CourseCategory courseCategory){
		return (CourseCategory)this.queryForObject("selectCourseCategoryById", courseCategory);
	}
	
	public void insertCourseCategory(CourseCategory courseCategory){
		this.insert("insertCourseCategory", courseCategory);		
	}
	
	public void updateCourseCategory(CourseCategory courseCategory){
		this.update("updateCourseCategory", courseCategory);	
	}
	
	public void deleteCourseCategory(CourseCategory courseCategory){
		this.delete("deleteCourseCategory", courseCategory);
	}
	public void deleteMoreCourseCategory(CourseCategory courseCategory){
		this.delete("deleteMoreCourseCategory", courseCategory);
	}
}
